package com.wps.wdztv6.api.common;

import com.wps.wdztv6.common.HttpPostUtil;
import com.wps.wdztv6.utils.WPS4Util;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpMethod;

import java.util.Map;

@Slf4j
public class WdztCommonApi {
    public static final String CONTENT_TYPE = "application/json";

    public static final String[] FILE_TYPES = {"w","s","p","f"};

    /**
     * 获取链接在线人数
     * @param host 中台地址
     */
    public static String getLicenceDetail(String host) throws Exception {
        String url = "/api/privilege/v1/licence/detail";
        Map<String,String> headers = WPS4Util.getSignatureHeaders(url, HttpMethod.GET.toString(),null,CONTENT_TYPE);
        return HttpPostUtil.sendGetRequest(host+url,headers, String.class);
    }
}
